<?php

/**
 * LongProgramCondition filter form.
 *
 * @package    sf_sandbox
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class LongProgramConditionFormFilter extends BaseLongProgramConditionFormFilter {

    public function configure() {
        unset($this['long_program_id']);
    }

    public function buildQuery(array $values) {
        $user = sfContext::getInstance()->getUser();
        
        if ($user->hasAttribute('long_program_id'))
            $values['long_program_id'] = $user->getAttribute('long_program_id');

        return parent::buildQuery($values);
    }

}
